package www.houdoudou.com.supplier;

import net.sf.json.JSONObject;

public class SupplierDoSth {

	
	public static JSONObject manageIndex(String jsonData){
		JSONObject result = new JSONObject();
			
			JSONObject jsoncheck= SupplierManagement.loginCheck(jsonData);
			
			if(jsoncheck.getBoolean("ActionStatus")){
				result =IndexManagement.managerIndex(jsonData);
			}else{
				result.put("ActionStatus", false);
				result.put("ErrorInfo", "登陆存储不正确");
			}
			
			return result;
	}
	
	
	public static JSONObject manageProduct(String jsonData){
		JSONObject result = new JSONObject();
			
			JSONObject jsoncheck= SupplierManagement.loginCheck(jsonData);
			
			if(jsoncheck.getBoolean("ActionStatus")){
				result =ProductManagement.manageProduct(jsonData);
			}else{
				result.put("ActionStatus", false);
				result.put("ErrorInfo", "登陆存储不正确");
			}
			
			return result;
	}
	
}
